{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="{% static 'teacher/css/ad.css' %}">
</head>
<body>
    <h1 class="tog">这是一个广告</h1>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    <script>
        var $objk = $('.tog');
        function f() {
            $objk.toggleClass('tog');
        }
        setInterval(f, 1000)
    </script>
</body>
</html>